<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>直排弹性盒案例</title>
    <style>
        .box,.item {
            border: 1px solid black;
        }

        .box {
            width: 500px;
            height: 250px;
            margin: 0 auto;

            /* 直排弹性盒 */
            display: flex;
            flex-direction: column;

            /* 纵向（主轴方向）贴边 + 居中 + 均匀分布 */

            /* 主轴贴边 */
            /* justify-content: start; */
            /* justify-content: end; */

            /* 主轴居中 */
            /* justify-content: center; */

            /* 主轴均匀分布 */
            /* 1 # 1 # 1 # 1 */
            justify-content: space-evenly;

            /* 0 # 1 # 1 # 0 */
            /* justify-content: space-between */

            /* 1 # 2 # 2 # 1 */
            /* justify-content: space-around; */


            /* 横向（交叉方向）贴边 + 居中 */

            /* 贴左边 */
            /* align-items: start; */

            /* 贴右边 */
            /* align-items: end; */

            /* 水平居中 */
            align-items: center;
        }

        .item {
            width: 100px;
            height: 50px;
        }

    </style>
</head>
<body>
    <div class="box">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
    </div>
    
</body>
</html>